
public class Calc {
	public float x,y;
	

	    public Calc(float x,float y)
	    {
	    	this.x=x;
	    	this.y=y;
	    }

	    public float Sufit(float x)
	    {
	    float z=Math.round(x);
	    return z;
	    }
	    public double podloga(float x)
	    {
	    int z=(int)x;
		return z;
	    }
	    public float dodawanie() 
		{
			 return x+y;
		}
		
		public float odejmowanie()
		{
			return x-y;
		}
	    
		public float mnozenie()
		{
			return x*y;
		}
		public float mod ()
		{
			return x%y;
		}
		public float dziel ()
		{
			if (y==0){
				return 0;
			}
			return x/y;
		}
		
		public boolean equals()
		{
		Calc c=new Calc(x,y);
			return x ==c.x && y==c.y;
		}
		
		public int compareTo()
		{
			if (dodawanie()<0){return -1 ;}
			else if (dodawanie()==0){return 0;}
			else return 1 ;
		}
		public  String toString() 
		{
			
			String s="";
			s+="x = "+x;
			s+="y = "+y;
			s+=" sajdfgasjdhfajkshdfjagh = "+dodawanie()+ "\n";
			s+=" odejmowanie = "+odejmowanie()+ "\n";
			s+=" mnozenie = "+mnozenie()+ "\n";
			s+=" modulo = "+mod()+ "\n";
			s+=" dzielenie = "+dziel()+ "\n";
			s+=" compare = "+compareTo()+ "\n";
			s+=" podloga x = "+podloga(x)+ "\n";
			s+=" podloga y = "+podloga(y)+ "\n";
			s+=" sufit x = "+sufit(x)+ "\n";
			s+=" sufit y = "+sufit(y)+ "\n";
			s+="equals = "+ equals();
			return s;
			
		}
		public static void main(String[] args)
		{
			Calc c=new Calc((float)1.7,(float)2.6);
		System.out.println(c);
		}
	}
